﻿

using hdb;
using System;
using System.Collections.Generic;

namespace hwms 
{
    public class WMSBaseTransFacade {
      

        static WcsTaskNoEngine taskNoEngine = new WcsTaskNoEngine();
        static WcsMoveTask wcsMoveTask = new WcsMoveTask();
        static WcsDeleteTaskEngine deleteTaskEngine = new WcsDeleteTaskEngine();

        public static TransRes doDeleteTaskEngine(long taskId) {
            lock( BaseConfig.transLockObj ) {

                deleteTaskEngine.paramId = taskId;

                TransRes res = deleteTaskEngine.doWork();
                return res;

            }
        }
        public static int getTaskNo()
        {
            lock( BaseConfig.transLockObj )
            {

                TransRes res = taskNoEngine.doWork();
                return taskNoEngine.taskNo;
            }
        }

        public static bool doWcsMoveTask(long cId ,long paramId ,int src ,int des) {
            lock( BaseConfig.transLockObj ) {
                wcsMoveTask.completeId = cId;
                wcsMoveTask.paramId = paramId;
                wcsMoveTask.src = src;
                wcsMoveTask.des = des;
                TransRes res = wcsMoveTask.doWork();
                return res.s;
            }
        }


    }
}
